home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13146 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: edmr54.ccinet.ab.ca!user
  2. From: d_martin@biomira.com (Douglas Martin)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Want single character input function for Solaris/UNIX
  5. Date: 4 Apr 1996 22:46:09 GMT
  6. Organization: Biomira Inc.
  7. Message-ID: <d_martin-0404961551560001@edmr54.ccinet.ab.ca>
  8. References: <4jrmbg$gkv@news.platinum.com>
  9. NNTP-Posting-Host: edmr54.ccinet.ab.ca
  10.  
  11. In article <4jrmbg$gkv@news.platinum.com>, jlane@brownstone.com (Jason J.
  12. Lane) wrote:
  13.  
  14. > Greetings,
  15. > I need a sample program/snippet that does single character input (raw)
  16. > under UNIX.  I'm porting code from OS/2 and it allowed me to use the
  17. > getch() function to retrieve a single character and act on it without
  18. > having the user hit <ENTER> first.  Basically I'm asking the user for a
  19. > password and don't want it to echo to the screen. I know this involves
  20. > curses in some manner but I'm not a UNIX guru.
  21. > TIA!
  22. Wrong newsgroup. However, first of all you don't need to do raw I/O (i.e.
  23. character-by-character rather than line-by-line) just to turn off echoing.
  24. Second of all, even if you did use raw I/O, that does not require curses.
  25. Check out things like stty, ioctl, and friends. If it's not obvious from
  26. that, ask in one of the Unix newsgroups.
  27.  
  28. -- 
  29. Douglas Martin                 d_martin@biomira.com
  30. Clinical Support Programmer    dmartin@freenet.edmonton.ab.ca
  31. Biomira Inc.
  32. 2011 - 94 St. Edmonton
  33.